import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { NgZorroAntdModule, NzNotificationService, NzMessageService } from 'ng-zorro-antd';
import { PIPES } from './pipes/index';
import { HELPERS } from './helper/index';
import { DIRECTIVES } from './directives/index';
import { VALIDATORS } from './validators';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    ReactiveFormsModule,
    RouterModule,
    NgZorroAntdModule
  ],
  declarations: [...DIRECTIVES, ...PIPES, ...VALIDATORS],
  providers: [...HELPERS],
  exports: [
    // CommonModule,
    // FormsModule,
    // ReactiveFormsModule,
    // RouterModule,
    // NgZorroAntdModule,
    ...DIRECTIVES,
    ...PIPES,
    ...VALIDATORS,
  ]
})
export class DsoSharedModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: DsoSharedModule,
      providers: [
        NzNotificationService,
        NzMessageService
      ]
    }
  }
}

export { STATUS_OBJ } from './pipes/index';